package com.labot.model;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

import org.hibernate.annotations.AccessType;

/**
 * This class represents the basic "user" object in AppFuse that allows for authentication
 * and user management.  It implements Acegi Security's UserDetails interface.
 *
 * @author <a href="mailto:matt@raibledesigns.com">Matt Raible</a>
 *         Updated by Dan Kibler (dan@getrolling.com)
 *         Extended to implement Acegi UserDetails interface
 *         by David Carter david@carter.net
 */
@Entity
@Table(name="app_centros")
@AccessType("field")
public class Centro extends BaseObject implements Serializable {

    private static final long serialVersionUID = -1;
    
    @Column(name="nombre", nullable = false, length = 50)
    private String nombre;
    @Column(name="origen", nullable = false, length = 50)
    private Integer origen;
    
    @Column(name="deletionTime")
    private Date deletiontime;
    
    @Column(name="mail")
    private String mail;
    
    public Centro() {
    }
    
    public Centro(String nombre) {
        this.nombre = nombre;
    }

    public String getNombre() {
        return nombre;
    }

    public void setNombre(String nombre) {
        this.nombre = nombre;
    }
    
    
    
    public Integer getOrigen() {
		return origen;
	}

	public void setOrigen(Integer origen) {
		this.origen = origen;
	}
	
	

	public Date getDeletiontime() {
		return deletiontime;
	}
	
	
	
	public String getMail() {
		return mail;
	}

	public void setMail(String mail) {
		this.mail = mail;
	}

	public void delete(){
		deletiontime = new Date();
	}

	@Override
	public String toString() {
		return "id: " + this.getId() + "\nnombre: " + this.getNombre();
	}

	@Override
	public boolean equals(Object o) {
		// TODO Auto-generated method stub
		return false;
	}

	@Override
	public int hashCode() {
		// TODO Auto-generated method stub
		return 0;
	}
    
}